1. Field of the Invention
The present invention relates to image processing, and more particularly, to a method and apparatus for adjusting image sharpness by using a step-wise gain control mechanism.
2. Description of the Prior Art
A conventional image processing apparatus 100 shown in FIG. 1 is provided to enhance the sharpness of image edges. The image processing apparatus 100 comprises a high-pass filter 110, a multiplier 120, a coring operation unit 130 and an adder 140. The high-pass filter 110 performs a high-pass filtering operation for an original incoming image data and generates a high-pass filtering result. Then the multiplier 120 multiplies the high-pass filtering result by a parameter khp to generate an edge detection result. Afterwards, the coring operation unit 130 performs well-known coring operations for the edge detection result with an input-to-output relation as shown in FIG. 2. Finally, the adder 140 sums up the original image data and an operation result of the coring operation unit 130 to generate an adjusted image data.
Please refer to FIG. 2. FIG. 2 is a schematic diagram illustrating an input-to-output relation of a typical coring operation. When an absolute value of an input value falls within a range between zero and a threshold value th_c, the output value is set to zero, and when an absolute value of an input value is greater than the threshold value th_c, the input value is, for example, closer or equal to the output value. In the prior art apparatus shown in FIG. 1, the input value represents the edge detection result while the output value represents the coring operation result of the coring operation unit 130.
However, before being processed by the coring operation, the input values may vary in a range due to noise interference. Therefore, the closer the input value is to the threshold value th_c, the greater the output value variation (jumping between zero and a value near d1) due to the noise interference. For example, if during a period in which the original image data are static, ideally the adjusted image data are also static; however, due to the noise influence mentioned above, some pixels of adjusted image data may have different gray values during this period, and what's worse, these different gray values of the pixels are concentrated around the value d1 and 0. As a result, the flicker occurs and the image quality degrades greatly.
On the other hand, in the image edge of the original image data, the edge detection result is large enough to make the summation of the coring operation result and the gray value of the original image data greater than 255; that is, the gray value of the adjusted image data is greater than 255 and exceeds the maximum gray value that can be displayed. Therefore white points occur at the image edge during the image processing shown in FIG. 1 and this phenomenon is called “overshoot”.
Flicker and overshoot are the side effects of the conventional image edge processing apparatus 100, and seriously influence the image quality.